package com.training.java.core.collections.post15;

public class Laptops {
	private String make;
	private String model;
	private int screenSize;

	public Laptops(String make, String model, int screenSize) {
		this.make = make;
		this.model = model;
		this.screenSize = screenSize;

	}

	public String getMake() {
		return make;
	}

	public void setMake(String make) {
		this.make = make;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public int getScreenSize() {
		return screenSize;
	}

	public void setScreenSize(int screenSize) {
		this.screenSize = screenSize;
	}

	@Override
	public boolean equals(Object obj) {

		Laptops that = (Laptops) obj;

		if (this.make.equals(that.make) && this.model.equals(that.model)) {

			return true;
		} else {
			return false;
		}

	}

	@Override
	public int hashCode() {

		return make.hashCode() + model.hashCode();
	}
}
